<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
	<base th:href="${#request.getContextPath()+'/'}">
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="stylesheet" href="layui/css/layui.css"  media="all">
<link rel="Bookmark" href="/favicon.ico" >
<link rel="Shortcut Icon" href="/favicon.ico" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5shiv.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="lib/Hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css" href="h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="h-ui.admin/css/style.css" />
	<link href="lib/icheck/icheck.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<!--/meta 作为公共模版分离出去-->

<title>修改用户</title>
<style type="text/css">
	#province select{margin-right:20px; width:100px;height: 30px}
</style>

</head>
<body>
<article class="page-container">
	<form action="" method="post" class="form form-horizontal" id="form-user-edit">
		<div class="row cl">
			<label class="form-label col-3 col-sm-3"><span class="c-red">*</span>用户名：</label>
			<div class="formControls col-5 col-sm-6">
				<input type="text" class="input-text" th:value="${user.username}" placeholder="" id="username" name="username"  errormsg="请输入4-16位字符" datatype="/^[a-z,0-9]{4,16}$/"  nullmsg="用户名不能为空">
			</div>
			<div class="col-4 col-sm-3"></div>
		</div>
		<div class="row cl">
			<label class="form-label col-3 col-sm-3"><span class="c-red">*</span>密码：</label>
			<div class="formControls col-5 col-sm-6">
				<input type="text" class="input-text" th:value="${user.password}" placeholder="" id="password" name="password"  errormsg="请输入4-16位字符" datatype="/^[a-z,0-9]{4,16}$/"  nullmsg="密码不能为空">
			</div>
			<div class="col-4 col-sm-3"></div>
		</div>
		<div class="row cl">
			<label class="form-label col-3 col-sm-3"><span class="c-red">*</span>用户昵称：</label>
			<div class="formControls col-5 col-sm-6">
				<input type="hidden" th:value="${user.userId}" name="userId">
				<input type="text" class="input-text" th:value="${user.nickName}" placeholder="" id="nickName" name="nickName"  errormsg="请输入2-6位中文" datatype="/^[\u4E00-\u9FA5\uf900-\ufa2d]{2,6}$/"  nullmsg="昵称不能为空">
			</div>
			<div class="col-4 col-sm-3"></div>
		</div>


		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>性别：</label>
			<div class="formControls col-xs-8 col-sm-9 skin-minimal">
				<div class="radio-box">
					<input name="sex" type="radio" value="0" id="sex-1" th:checked="${user.sex==0}?true:false">
					<label for="sex-1">男</label>
				</div>
				<div class="radio-box">
					<input type="radio" id="sex-2" value="1" name="sex" th:checked="${user.sex==1}?true:false">
					<label for="sex-2">女</label>
				</div>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-3 col-sm-3"><span class="c-red">*</span>邮箱：</label>
			<div class="formControls col-5 col-sm-6">
				<input type="text" class="input-text" th:value="${user.email}" placeholder="" id="email" name="email" datatype="e" errormsg="请输入正确邮箱" nullmsg="邮箱不能为空">
			</div>
			<div class="col-4 col-sm-3"></div>
		</div>
		<div class="row cl">
			<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
				<input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
			</div>
		</div>
	</form>
</article>

<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="h-ui/js/H-ui.min.js"></script>
<script type="text/javascript" src="h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->

<script type="text/javascript" src="lib/Validform/5.3.2/Validform.min.js"></script>
<script type="text/javascript" src="lib/icheck/jquery.icheck.min.js"></script>

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="lib/jquery.validation/1.14.0/jquery.validate.js"></script>
<script type="text/javascript" src="lib/jquery.validation/1.14.0/validate-methods.js"></script>
<script type="text/javascript" src="lib/jquery.validation/1.14.0/messages_zh.js"></script>


<script type="text/javascript" src="h-ui/js/H-ui.js"></script>



<script type="text/javascript" src="lib/jquery/provincesData.js"></script>
<script  src="lib/jquery/jquery.provincesCity.js" th:inline="javascript"></script>

<script type="text/javascript" src="h-ui/js/submit_form_register.js"></script>

<script type="text/javascript" th:inline="javascript">
$(function() {
    $("#form-user-edit").Validform({
        tiptype:2
        ,callback:function(form){ // 表单校验通过后调用这个函数
			console.info("表单校验通过");
            submitForm("user/editUser","form-user-edit")

            // 如果callback里明确return false，则表单不会提交，如果return true或没有return，则会提交表单
            return false;
        }
    });
});



/*调用插件*/
$(function(){
	var address=Object();
	address.province=[[${province}]];
	address.city=[[${city}]];
	address.county=[[${county}]];

	$("#province").ProvinceCity(address);

});
var _hmt = _hmt || [];
(function() {
	var hm = document.createElement("script");
	hm.src = "https://hm.baidu.com/hm.js?080836300300be57b7f34f4b3e97d911";
	var s = document.getElementsByTagName("script")[0];
	s.parentNode.insertBefore(hm, s)})();
</script> 
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>